package itasura.singleton.dcl;

/**
 * @author sailor wang
 * @date 2020/6/30 6:56 PM
 * @description
 */
public class Singleton {
    private volatile static Singleton instance;

    private Singleton(){}

    private static Singleton getInstance(){
        if (instance == null){
            synchronized (Singleton.class){
                if (instance == null){
                    instance = new Singleton();
                }
            }
        }
        return instance;
    }
}